package com.example.demo.dao;

import com.example.demo.model.BookInfo;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class BookDao {
    public List<BookInfo> mockData(){
        List<BookInfo> books=new ArrayList<>();
        for (int i = 1; i < 5; i++) {
            BookInfo book=new BookInfo();
            book.setBookName("书籍"+i);
            book.setAuthor("作者"+i);
            book.setId(i);
            book.setCount(i*4);
            book.setPublish("出版社"+i);
            book.setPrice((double) new Random().nextInt(100));
            book.setStatus(5%i);
            books.add(book);
        }
        return books;
    }
    }

